<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>2018/12/4</title>
    <script src="node_modules/vue/dist/vue.min.js"></script>
    <script src="node_modules/mockjs/dist/mock-min.js"></script>
    <link rel="stylesheet" href="./index.css">
    <!--好的代码像粥一样,是得用时间和精力熬的。-->
</head>
<body>
<div id="root" v-cloak>
    <!--防止页面"闪烁"-->
    <ul v-show="!!userData.length" class="user-list">
        <li class="user-item">
            <span>姓名</span>
            <span>性别</span>
            <span>年龄</span>
            <span>电话</span>
            <span>操作</span>
        </li>
        <!--改写三和改写四是下面第一的-->
        <li v-for="(item,index) in filterUser" class="user-item">

        <!--<li v-for="(item,index) in userData" class="user-item">-->
            <span>{{item.name}}</span>
            <span>{{item.gender|toGender}}</span>
            <span>{{item.age}}</span>
            <span>{{item.phoneNumber}}</span>
            <span @click="clickToDel(index)">删除</span>
        </li>
    </ul>
    <ul class="ft-bar">
        <li v-for="(item,key) in ftBar" @click="select(key)" :class="{active: key===selectedKey}">{{item}}</li>
    </ul>
    <!--<div v-once>{{msg}}</div>-->
    <!--<div v-text="htmlTag"></div>-->
    <!--<input type="text" v-model="username">-->
    <!--<button @click="fn">提交</button>-->
    <!--<h1 v-if="">请登录</h1>-->
    <!--<h1 v-else="isLogIn">登录成功</h1>-->
    <!--给html标签的属性绑定数据-->
    <!--<a v-bind:href="href" style="" :class="['test',{d: isActive}]" id="">{{hrefName}}</a>-->
    <!--<a :href="href" :style="{background: 'red',color:'#fff'}" :class="[{test: !isActive},{[d]: isActive}]" id="">{{hrefName}}</a>-->
    <!--<div style="width: 300px;height: 300px;background:orangered" @click.self="alert(123)">-->
        <!--<div style="width: 100px;height: 100px;background: aqua" @click.stop="alert(234)">-->
            <!--<a href="https://www.baidu.com" @click.prevent.stop="alert('...')">baidu</a>-->
        <!--</div>-->
    <!--</div>-->
    <!--<input type="text" v-model.number="ipt">-->
    <!--<input type="text" @keyup.ctrl.enter="alert('F1')">-->
    <!--<h1>{{ipt}}</h1>-->
</div>



</body>
<script src="index3.js"></script>
</html>
